package com.gitee.cirnochat.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.cirnochat.common.model.vo.resp.PageVo;
import com.gitee.cirnochat.user.model.entity.User;
import com.gitee.cirnochat.user.model.entity.UserPermission;
import com.gitee.cirnochat.user.model.vo.req.user.UserEmailResetPasswordRequest;
import com.gitee.cirnochat.user.model.vo.req.user.UserEmailSetPasswordRequest;
import com.gitee.cirnochat.user.model.vo.req.user.UserInfoUpdateRequest;
import com.gitee.cirnochat.user.model.vo.req.user.UserOnlineStatusUpdateRequest;
import com.gitee.cirnochat.user.model.vo.resp.UserVo;

/**
* @author FlanChan
* @description 针对表【user(用户信息)】的数据库操作Service
* @createDate 2025-04-17 14:31:33
*/
public interface UserService extends IService<User> {

    void initUserInfo(Long userId);

    UserVo getUserInfoWithFriendRelById(Long friendId , Long userId);

    UserPermission getUserPermissionById(Long userId, Long currentUserId);

    void updateUserAvatar(Long userId, String avatarUri);

    void updateUserInfo(UserInfoUpdateRequest req);

    void updateUserPreferStatus(UserOnlineStatusUpdateRequest req, Long userId);

    void updateUserPassword(UserEmailResetPasswordRequest req);

    void updateUserPassword(UserEmailSetPasswordRequest req, Long userId);

    UserVo getUserInfoById(Long userId);

    UserVo searchByUUID(Long userId,  String uuid);

    PageVo<UserVo> searchByKeyword(Long userId, String keyword, int page, int size, int sort);

    Long validateAndParseUserId(String token, String deviceId);

    boolean existsById(Long userId);

}
